home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / cycle.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.8 KB  |  68 lines

  1. // $Id: cycle.h 1.2 1997/07/14 04:26:36 dlorre Exp dlorre $
  2. #ifndef CLASS_CYCLE_H
  3. #define CLASS_CYCLE_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef CLASS_WINDOW_H
  10. class window ;
  11. #endif
  12.  
  13. #ifndef CLASS_GADGETLIST_H
  14. class gadgetlist ;
  15. #endif
  16.  
  17. #ifndef CLASS_GADGET_H
  18. #include "gadgets/gadget.h"
  19. #endif
  20.  
  21. #define OCYCLE_Base         (TAG_USER+100)
  22. #define OCYCLE_Active       (OCYCLE_Base+0)
  23. #define OCYCLE_Flags        (OCYCLE_Base+1)
  24. #define OCYCLE_Text         (OCYCLE_Base+2)
  25. #define OCYCLE_TextArray    (OCYCLE_Base+3)
  26. #define OCYCLE_Label        (OCYCLE_Base+4)
  27.  
  28.  
  29. // ========================================================================
  30. // ==========================  CYCLE CLASS ================================
  31. // ========================================================================
  32.  
  33. class cycle : public gadget
  34. {
  35.     const char  **xlabs ;
  36.     STRPTR      *cylabs ;
  37.     short       labsize ;
  38. public:
  39.     short   cursel ;
  40.  
  41.     cycle(gadgetlist *gl,
  42.           void (window::*func)(gadget *, unsigned long, unsigned short),
  43.           const char *text,
  44.           LONG      flags,
  45.           long active, const char** table) ;
  46.     cycle(gadgetlist *gl,
  47.           void (window::*func)(gadget *, unsigned long, unsigned short),
  48.           const char *text,
  49.           LONG      flags,
  50.           long active, const char *t, ...) ;
  51.     cycle(gadgetlist *gl,
  52.           void (window::*func)(gadget *, unsigned long, unsigned short),
  53.           TagItem *tags) ;
  54.  
  55.     cycle(gadgetlist *gl,
  56.           void (window::*func)(gadget *, unsigned long, unsigned short),
  57.           ULONG tag1, ...) ;
  58.     ~cycle() ;
  59.     void init(TagItem *tags) ;
  60.     void initlabs(TagItem *tags) ;
  61.     void freelabs() ;
  62.     void action(unsigned long, unsigned short) ;
  63.     void keystroke(BOOL shifted) ;
  64.     void set(TagItem *tags) ;
  65.     void set(ULONG tag1, ...) ;
  66. };
  67. #endif
  68.